<template>
	<view class="nft_container_bg">
		<z-paging ref="paging" v-model="dataList" @query="queryList" empty-view-img="../../static/img/nullData.png"
			empty-view-text="暂无数据">
			<view class="nftEquity">
				<!--轮播-->
				<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true">
					<swiper-item v-for="item in swiperList" :key="item.index">
						<view class="swiper-item">
							<image class="banner-img" :src="item"></image>
						</view>
					</swiper-item>
				</swiper>
				<equity-card v-for="(item, index) in dataList" :item="item"></equity-card>
			</view>
		</z-paging>
	</view>
</template>
<script>
	import {
		getRightsInterestsPageList
	} from '@/config/rightsInterestsApi.js';
	export default {
		data() {
			return {
				swiperList: [
					"../../static/img/lunbo1.png",
					"../../static/img/lunbo2.png",
					"../../static/img/lunbo3.png"
				],
				// 数据列表
				dataList: [],
			}
		},
		methods: {
			queryList(pageNo, pageSize) {
				// 查询权益列表
				getRightsInterestsPageList({
					pageNo,
					pageSize
				}).then(res => {
					console.log(res)
					if (res)
						this.$refs.paging.completeByTotal(res.data, res.pagination.totalSize);
				})
			}
		}
	}
</script>
<style lang="scss">
	.nft_container_bg {
		min-height: 100vh;
		background: $echo-nft-bg-color;

		.nftEquity {
			min-height: 100vh;

			.swiper-item,
			.banner-img {
				width: 100%;
				height: 100%;
			}
		}
	}
</style>
